package project.pianpian.mapper;

import org.springframework.data.repository.query.Param;
import project.pianpian.entity.Order;
import org.apache.ibatis.annotations.Mapper;
import project.pianpian.entity.User;

import java.util.List;

/**
 * Description:
 * Param:
 * return:
 * Author: HSY
 * Date:2022/12/26
 */
@Mapper
public interface OrderMapper {
    int addOrder(Order order);
    int updateOrderStatus(int id);
    Order getOrderById(int id);
    List<Order> getOrders();

    List<Order> findByTitle(@Param("start") int start, @Param("size")int size, @Param("title") String title);

    int getTotalCount(@Param("title") String title);

    int deleteOrderById(int id);
}
